<template>
    <div class="pinpai">
        <!--//品牌的选择-->
        <div  id="sort">
            <header class="fixed">

                <div class="header">
                    <!--<a style="float:left; color: #000;" href="chaxun.php">-->
                    <!--返回-->
                    <!--</a>-->
                    热门品牌
                </div>
            </header>
            <div id="letter" ></div>
            <div class="sort_box" style="padding-top:0 ">
                <div class="re_men">
                    <ul>
                        <router-link tag="li" :key="index" v-for="(itme, index) in hot_list" :to="{ name: 'chaxun', query:itme}">
                            <div class="num_logo">
                                <img width="100%" :src=itme.image alt="">
                            </div>
                            <div class="re_name">{{itme.name}}</div>
                        </router-link>

                    </ul>
                    <div style="clear: both"></div>
                </div>
                <router-link tag="div" :key="indexs" v-for=" (itme,indexs) in list" class="sort_list tai" :to="{ name: 'chaxun', query:itme}" >
                    <!--<div class="num_logo">-->
                    <!--<img src=${obj.image}  alt="">-->
                    <!--</div>-->
                    <div class="num_name nb">{{itme.name}}</div>
                </router-link>
            </div>
            <div class="initials">
                <ul>
                    <li >热</li>
                </ul>
            </div>

        </div>
    </div>
</template>

<script>
    import $ from 'jquery';
//    import '../assets/jquery.charfirst.pinyin';
//    import '../assets/sort'
      import  sorts from '../assets/js/sort.js'
    export default {
        name: 'pinpai',
        data() {
            return {
                hot_list:[],
                list:[]
            }
        },
        methods: {
            sort(){
                sorts()
            }
        },
        created:function () {
//            $(document).ready();
//          ../assets/
            this.$http.post('https://api.mayinvwang.com/Wechat/newBrand',{
                token:this.$store.state.token||sessionStorage['token']
            }).then(
                (res)=>{
                    console.log(res);
                    this.hot_list=res.data.hot_list;
                    this.list=res.data.list;
//                  this.sort();
                }).then(()=>{
                this.sort();
            });

            console.log(this.hot_list)
//          ../assets/
//            console.log('wo shi ')
        },
//        mounted() {
//            this.sort();
//
//        },
//        beforCreate () {
//            this.sort();
//
//        },
//        beforMount (){
//            this.sort();
//        }



    }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
    @import "../assets/css/pinpai.css";
</style>
